{config_load file="index.conf"}<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
    <card title="My messages">
        {include file="inc/global_menu.tpl"}
        {include file="profile/inc/data.tpl"}<br />
        
        {if $course == 'from'}<a href="/profile/messages/">Input</a>{else}<b>Input</b>{/if} 
        {if $course == 'to'}<a href="/profile/messages/output/">Output</a>{else}<b>Output</b>{/if}<br /><br />
        
        {if sizeof($messages_list)}
		    {foreach from=$messages_list item=item}
		        <a href="/another/index/{$item.user_id}/">{$item.user_login}</a> {$item.message_created}<br />
		        {if !$item.message_read}<strong>{/if}
		            <a href="/profile/message/{$item.message_id}/{$item.user_id}/">{$item.message_title|escape}</a>
		        {if !$item.message_read}</strong>{/if}<br />
		        {$item.message_content|truncate:"80"}...<br />
		        {if $course == 'to'}<a href="/another/send/{$item.user_id}/">Answer</a> <a href="/profile/delmessage/{$item.message_id}/">Delete</a>{/if}<hr />
		    {/foreach}
		    <br />
		    <!-- Paging -->
		    {foreach from=$paging item=item key=key}
		        {if $page == $key}{$item}{else}<a href="{$sys_action_path}/{if $course == 'from'}output/{else}input/{/if}{if 1 != $item}{$key}/{/if}">{$item}</a>{/if} 
		    {/foreach}
		    <!--// Paging -->
		{else}
		    <p>Empty</p>
		{/if}

        {include file="profile/inc/return.tpl"}
    </card>
</wml>